<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('course/index')}">学科列表</a></li>
        <li class="active"><a>编辑学科</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('course/editPost')}">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label">学科名称<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" name="name" value="{$course.name}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">学科老师<span class="form-required">*</span></label>
            <div class="col-md-6 col-sm-10" >
                <select name="teacher_id" class="form-control">
                    <option value="">|--请选择老师--|</option>
                    <foreach name="teacher" item="vo">
                        <if $vo.id == $course.teacher_id>
                            <option value="{$vo.id}" selected>{$vo.name}</option>
                            <else>
                                <option value="{$vo.id}">{$vo.name}</option>
                            </else>
                        </if>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="id" value="{$course.id}">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                <a class="btn btn-default" href="{:url('course/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>